.TH E1432_SET_COUPLING 3 E1432
.SH NAME
.nf
e1432_set_coupling \- Set input coupling to AC or DC
e1432_get_coupling \- Get current state of input coupling
.fi
.IX e1432_set_coupling(3) 3
.IX e1432_get_coupling(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_coupling(E1432ID hw, SHORTSIZ16 ID,
                              SHORTSIZ16 coupling)
SHORTSIZ16 e1432_get_coupling(E1432ID hw, SHORTSIZ16 ID,
                              SHORTSIZ16 *coupling)
.cE
.SH DESCRIPTION
\fIe1432_set_coupling\fR sets the input coupling, of a single channel
or group of channels \fIID\fR, to the value given in \fIcoupling\fR.

\fIe1432_get_coupling\fR returns the current state of the input
coupling, of a single channel or group of channels \fIID\fR, in a
memory location pointed to by \fIcoupling\fR.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIcoupling\fR determines the AC or DC coupling mode of the input.  In
addition, it can control the high-pass filter that is present on some
Charge and Microphone Break-out Boxes.  The valid values for
\fIcoupling\fR are:

\fBE1432_COUPLING_DC\fR, which DC couples the input (and turns off the
high-pass filter if one is present on the Charge or Microphone
Break-out Box).

\fBE1432_COUPLING_AC\fR, which AC couples the input (and turns off the
high-pass filter if one is present on the Charge or Microphone
Break-out Box).

\fBE1432_COUPLING_DC_BOB_HP\fR, which DC couples the input, and also
turns on the high-pass filter on the Charge or Microphone Break-out
Box.  This value is valid only if there is a Charge Break-out Box with
option 402 or a Microphone Break-out Box with option 402 connected to
the input.  In addition, this value is valid only when the Charge
Break-out Box is in charge mode or the Microphone Break-out Box is in
Microphone mode (see \fIe1432_set_input_mode\fR).

\fBE1432_COUPLING_AC_BOB_HP\fR, which AC couples the input, and also
turns on the high-pass filter on the Charge or Microphone Break-out
Box.  This value is valid only if there is a Charge Break-out Box with
option 402 or a Microphone Break-out Box with option 402 connected to
the input.  In addition, this value is valid only when the Charge
Break-out Box is in charge mode or the Microphone Break-out Box is in
Microphone mode (see \fIe1432_set_input_mode\fR).

On an E1432 input, the AC coupling filter is a simple one-pole analog
filter with a cutoff of about 0.7 Hz, which gives it a settling time
constant of about 150 ms.

On an E1433 input, the AC coupling filter is implemented using
feedback from the input DSP back to a DAC connected to the analog
signal path.  This complicated setup allows the corner frequency of
the AC coupling to be changed programmatically (see
\fIe1432_set_coupling_freq\fR), allows tight phase-matching between
E1433 input channels, and does a better job of removing DC offsets.
The settling time constant for this filter is roughly 0.25/f0 seconds,
where f0 is the programmed corner frequency.

The output of a Charge Break-out Box in Charge mode is always
inherently AC coupled, regardless of the setting of this
\fIcoupling\fR parameter.  However, there may be a residual DC offset
coming out of the Charge BoB.  If the input coupling is set to AC
coupling, this DC offset should be (at least partially) removed.  If
the input coupling is set to \fIE1432_COUPLING_AC_BOB_HP\fR, or
\fIE1432_COUPLING_DC_BOB_HP\fR, then the output of the Charge BoB has
a high-pass filter applied to it, which will help remove low-frequency
signals.  The high-pass filter is a third-order Butterworth filter
with a cutoff frequency of about 10 Hz.

The output of a Microphone Break-out Box in Microphone mode is always
inherently AC coupled, regardless of the setting of this
\fIcoupling\fR parameter.  However, there may be a residual DC offset
coming out of the Microphone BoB.  If the input coupling is set to AC
coupling, this DC offset should be (at least partially) removed.  If
the input coupling is set to \fIE1432_COUPLING_AC_BOB_HP\fR or
\fIE1432_COUPLING_DC_BOB_HP\fR, then the output of the Microphone BoB
has a high-pass filter applied to it, which will help remove
low-frequency signals.  The high-pass filter is a third-order
Butterworth filter with a cutoff frequency of about 22.4 Hz.  For
input range settings greater than 5 Volts, the high-pass filter is
disconnected due to hardware limitations (which may be changed in the
future), even when the \fIcoupling\fR is set to enable the high-pass
filter.

For source channels, this parameter is not used, since it is not
possible to AC couple the output of the source.  An attempt to set
this parameter will generate an error.

For tach channels, this parameter is not used, since it is not
possible to AC couple the tach input.  An attempt to set this
parameter will generate an error.
.SH "RESET VALUE"
After a reset, \fIcoupling\fR is set to \fBE1432_COUPLING_DC\fR.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_analog_input, e1432_set_coupling_freq, e1432_set_input_mode
.ad
